//Name:
//Purpose:
//Author: wjy
//Date: 2022-01-10 14:01:42
//From:
 
#include <stdio.h>
#include <stdlib.h>
 
int main(void)
{
    float income, tax;
    printf ("Enter your income: ");
    scanf ("%f", &income);
    if (income <= 750.00f)
    {
        tax = 0.01f*income;
    }
    else if (income <= 2250.00f)
    {
        tax = 7.50f+(income -750.00f)*0.02f;
    }
    else if (income <= 3750.00f)
    {
        tax= 37.50f+(income-2250.00f)*0.03f;
    }
    else if (income <= 5250.00f)
    {
        tax = 82.50f + (income - 3750.00f)*0.04f;
    }
    else if (income <= 7000.00f)
    {
        tax = 142.50f + (income - 5250.00f) * 0.05f;
    }
    else
    {
        tax = 230.00f + (income - 7000) * 0.06f;
    }
    printf ("Pay tax: $%.2f\n", tax);
    system("pause");
    return 0;
}